package com.jy.authors.domain;

import java.util.List;

import com.jy.books.domain.Books;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.jy.common.annotation.Excel;
import com.jy.common.core.domain.BaseEntity;

/**
 * 作者对象 authors
 * 
 * @author ruoyi
 * @date 2025-05-29
 */
public class Authors extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 作者ID */
    private Long authorId;

    /** 作者姓名 */
    @Excel(name = "作者姓名")
    private String name;

    /** 作者国籍 */
    @Excel(name = "作者国籍")
    private String country;

    /** 出生年份 */
    @Excel(name = "出生年份")
    private Long birthYear;

    /** 逝世年份（NULL表示在世） */
    @Excel(name = "逝世年份", readConverterExp = "N=ULL表示在世")
    private Long deathYear;

    /** 书籍管理信息 */
    private List<Books> booksList;

    public void setAuthorId(Long authorId) 
    {
        this.authorId = authorId;
    }

    public Long getAuthorId() 
    {
        return authorId;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setCountry(String country) 
    {
        this.country = country;
    }

    public String getCountry() 
    {
        return country;
    }

    public void setBirthYear(Long birthYear) 
    {
        this.birthYear = birthYear;
    }

    public Long getBirthYear() 
    {
        return birthYear;
    }

    public void setDeathYear(Long deathYear) 
    {
        this.deathYear = deathYear;
    }

    public Long getDeathYear() 
    {
        return deathYear;
    }

    public List<Books> getBooksList()
    {
        return booksList;
    }

    public void setBooksList(List<Books> booksList)
    {
        this.booksList = booksList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("authorId", getAuthorId())
            .append("name", getName())
            .append("country", getCountry())
            .append("birthYear", getBirthYear())
            .append("deathYear", getDeathYear())
            .append("booksList", getBooksList())
            .toString();
    }
}
